package com.vdong.trade.trading.service;


import com.vdong.trade.trading.common.contract.AbstractResponse;
import com.vdong.trade.trading.entity.dto.param.PaymentRequestDTO;

import java.util.Map;

/**
 * @author clf
 * @Description: Payment
 * @Date 2018/12/10 9:15
 */
public interface Payment {

    /**
     * 发起交易执行的过程
     *
     * @param request
     * @return
     * @throws Exception
     */
    AbstractResponse process(PaymentRequestDTO request) throws Exception;

    /**
     * 完成交易结果的处理
     *
     * @param result
     * @return
     * @throws Exception
     */
    AbstractResponse completePayment(String result) throws Exception;

    /**
     * 查询订单状态
     *
     * @param orderNo
     * @return
     * @throws Exception
     */
    Map<String, String> queryOrder(String orderNo) throws Exception;
}
